package cn.kgc.springcloud.controller;

import cn.kgc.springcloud.clients.NacosClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 课工场
 * @date 2024/10/21
 * @description  作为nacos请求的控制层  测试nacos注册中心的使用
 */
@RestController
@RequestMapping("nacos")
public class NcosController {

    @Resource
    private NacosClient nacosClient;
    @GetMapping("m1")
    public String method1(){

        String s = nacosClient.method1();
        return "NcosController method1 ok  --nacosClient--> "+s;
    }
}
